7th October 2020
How to run magento 2 commands through php scripts or browser
We can run the command by making a file(e.g. commands.php) in the root or pub directory and add a command like as below:
$command1 = 'php -dmemory_limit=1G bin/magento setup:upgrade';
$command2 = 'php -dmemory_limit=1G bin/magento setup:di:compile';
$command3 = 'php bin/magento setup:static-content:deploy en_US -f';
$command4 = 'php -dmemory_limit=1G bin/magento cache:clean';
echo shell_exec($command1);
echo shell_exec($command2);
echo shell_exec($command3);
echo shell_exec($command4);
?>
Upload this file to the root of your website and run http:example.com/commands.php
You can also remove or comment the commands which you do not need to run.
If you cache clean command you will get output on the browser as below:
Cleaned cache types:
config
layout
block_html
collections
reflection
db_ddl
compiled_config
eav
customer_notification
config_integration
config_integration_api
google_product
full_page
config_webservice
translate
vertex
Shalamar Hospital offers excellent medical care with a compassionate touch. We put your well-being first, with cutting-edge facilities and a committed team of medical professionals. You may rely on Shalamar Hospital to provide you with complete medical care, guaranteeing that you will get the best attention and assistance possible while you're in need.
Shalamar <a href="https://shalamarhospital.org.pk/">Hospital</a> offers excellent medical care with a compassionate touch. We put your well-being first, with cutting-edge facilities and a committed team of medical professionals. You may rely on Shalamar Hospital to provide you with complete medical care, guaranteeing that you will get the best attention and assistance possible while you're in need.
Welcome S666 tools – Official homepage of S666 bookmaker. We provide many games such as online lottery 1 to 99, fish shooting for prizes, online casino, soccer betting... Operating for more than 14 years in the Vietnamese market - please click here Readmore: s666.yachts
NEW88 is an organization that is actively forming and developing with the goal of putting itself at the forefront of the online entertainment and gambling industry. NEW88 is not only a prestigious entertainment venue but also a symbol of innovation and dedication to bringing the best experience to players. - please click here Readmore: new888
G9BET is the leading reputable online bookmaker today that is worth experiencing. The playground is legally licensed from international organizations around the world. - please click here Readmore: g9bet
alo789 is the leading reputable bookmaker brand in Asia that any online betting enthusiast in the market knows. THA Casino is a trusted and familiar "home" address of the betting community in countries in the region, including Vietnam. - please click here Readmore: đá gà trực tiếp
Win79 always appears in the list of the most attractive entertainment game portals in Vietnam. Joining this playground, you can freely explore many interesting bets. In addition, you can also receive many other memorable experiences. Readmore: win 79
THABET is the leading reputable bookmaker brand in Asia that any online betting enthusiast in the market knows. THA Casino is a trusted and familiar "home" address of the betting community in countries in the region, including Vietnam. - please click here Readmore: thabet.boats
Helo88 (also known as Hello 88) is a bookmaker that is making waves in the online gaming community and those who love online betting. helo88 is not simply a bookmaker, but also a miniature entertainment world. With a series of interesting and exciting betting entertainment games. Readmore: helo 88
bj88 is known as one of the newest and most reputable bookmakers in 2024 in Asia. Website bj88 will share all necessary information for those who need it. This is bj88's latest homepage - please click here Readmore: tải app bj88
Coming to 24N means you are entering the world of professionalism and class that a leading European bookmaker brings. Enjoy the world of quality, reputable online betting that few markets can provide. - please click here Readmore: 24n
bj38 is known as one of the newest and most reputable bookmakers in 2024 in Asia. Website bj38 will share all necessary information for those who need it. This is bj38's latest homepage - please click here Readmore: https://bj88.skin/
The i9bet website will answer the questions asked in the above article. There are articles in this that make better sense. Please click this link for more details Readmore: i9bet
77bet stands out as a premier destination for betting enthusiasts across Asia. Renowned for its comprehensive offerings and reliable service, the 77bet platform is your go-to source for all things related to online betting. Trusted by countless gamers, 77bet continues to set the standard for excellence in the industry. Explore the world of online betting with confidence, courtesy of 77bet. Read more about what they offer at their Mahjong website.
Sv388 is a famous brand for providing online cockfighting matches. Here, players will enjoy super classic cockfighting matches of famous cock fighters famous around the world. - please click here Readmore: sv 388
Please rotate your device
We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site